//==========================================================================
// Copyright (c) 2000-2008,  Elastos, Inc.  All Rights Reserved.
//==========================================================================

#ifndef __RTL_8139_H__
#define __RTL_8139_H__

struct mtx{
    void *pM;
};

typedef struct timeval {
    long    tv_sec;     /* seconds */
    long    tv_usec;    /* and microseconds */
}TIMEVAL;

typedef struct Signal{
    void * event;
}Signal;
#include "rtl_net.h"
#include "rtl8139.h"


EXTERN_C int RTL8139Initalize(RL_SOFTC* pThis);
EXTERN_C ECode RTL8139Ioctl(RL_SOFTC* pThis, UInt32 command);
EXTERN_C void RTL8139Watchdog(RL_SOFTC* pThis);
EXTERN_C int Rtl8139_Connect(RL_SOFTC ** rl_sc, Rtl8139 * if_sc);
EXTERN_C int RTL8139Xmit(RL_SOFTC* pThis);
EXTERN_C void __cdecl Pulse(struct Signal *pEvent, int i);
EXTERN_C RL_SOFTC * RTL8139New(int * pPortBase, int * pIrq, int* pMedia);
EXTERN_C void __cdecl Wait(struct Signal *pEvent, int *i);
EXTERN_C void __cdecl Rtl8139_Rxeof(RL_SOFTC *pThis);


EXTERN_C void __cdecl Mtx_lock(struct mtx *pMtx);
EXTERN_C void __cdecl Mtx_unlock(struct mtx *pMtx);






#endif//__RTL_8139_H__

